<ui:composition xmlns="http://www.w3.org/1999/xhtml" 
    xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:tr="http://myfaces.apache.org/trinidad"
	xmlns:trh="http://myfaces.apache.org/trinidad/html"
    xmlns:ppc="http://www.sungard.de/carnot/web/portal-plugin/common">
    
                <div id="navigationBarWrapper">                
					<tr:navigationPane hint="bar" disabled="#{portalHeader.processPortalSession.activityPanelVisible}"
                        styleClass="mainNavBar mainCommandBar" id="mainNavBar">
                        <tr:commandNavigationItem id="configureOn" 
                            action="#{configuration.switchOn}"
                            text="#{commonMsg.configure} #{commonMsg.on}" 
                            rendered="#{configuration.rendered and configuration.off}" />
                        <tr:commandNavigationItem id="configureOff" 
                            action="#{configuration.switchOff}"
                            text="#{commonMsg.configure} #{commonMsg.off}" 
                            rendered="#{configuration.rendered and configuration.on}" />
                        <tr:commandNavigationItem text="#{commonMsg.search}"
                            action="success"
                            disabled="#{portalHeader.processPortalSession.activityPanelVisible}"
                            id="searchMenuEntry">
                            <tr:setActionListener from="#{true}" 
                                to="#{pageFlowScope.showSearchWizard}"/>
                            </tr:commandNavigationItem>
                        <tr:commandNavigationItem text="#{commonMsg.filter}"
                            action="dialog:descriptorFilter"
                            disabled="#{portalHeader.processPortalSession.activityPanelVisible}"
                            useWindow="true" windowWidth="400"
                            windowHeight="400"
                            returnListener="#{portalHeader.returnFromFilterDialog}"
                            partialSubmit="true" id="filterMenuEntry"/>
						<tr:commandNavigationItem text="#{localeBundle.userProfile}"
							action="dialog:userProfile"
                            disabled="#{portalHeader.processPortalSession.activityPanelVisible}"
							useWindow="true" windowWidth="780"
							windowHeight="400" id="userProfile"
							launchListener="#{portalHeader.launchUserProfileDialog}"
							returnListener="#{portalHeader.modifyUser}"
							partialSubmit="true" />
                        <tr:commandNavigationItem text="#{commonMsg.options}"
                            action="success"
                            disabled="#{not portalHeader.processPortalSession.optionMenuItemAvailable}"
                            id="options">
                            <tr:setActionListener from="#{portalHeader.optionPage}" 
                                to="#{portalHeader.processPortalSession.currentPage}"/>
						</tr:commandNavigationItem>
                        <tr:commandNavigationItem text=""
                            disabled="true" rendered="#{processPortalMenuModel.rowCount > 0}"/>
					</tr:navigationPane>
      
                    <tr:navigationPane hint="bar" disabled="#{portalHeader.processPortalSession.activityPanelVisible}" 
                        id="mainPluginBar" rendered="#{processPortalMenuModel.rowCount > 0}"
                        styleClass="mainNavBar mainPluginBar"
                        value="#{processPortalMenuModel}" var="menuItem">
                        <f:facet name="nodeStamp">
                            <tr:commandNavigationItem text="#{menuItem.label}"
                                rendered="#{menuItem.rendered}"
                                disabled="#{not (ppc:isUserAuthorizedForMenuItem(menuItem))}"
                                destination="#{empty menuItem.destination ? initParam[menuItem.customPropList.requiredInitParam] : menuItem.destination}"
                                targetFrame="#{menuItem.targetFrame}">
                                <tr:setActionListener from="#{menuItem}" 
                                    to="#{pageFlowScope.selectedMenuItem}"/>
                            </tr:commandNavigationItem>
                        </f:facet>
                    </tr:navigationPane>

                    <tr:navigationPane hint="bar"
                        id="userActionBar" styleClass="mainNavBar userActionBar">
                        <tr:commandNavigationItem id="userItemInNavigationBar"
                            action="dialog:userProfile"
                            text="#{sessionContext.user.firstName} #{sessionContext.user.lastName}"
                            windowWidth="640" windowHeight="480" partialSubmit="true"
                            useWindow="true" immediate="true"
                            partialTriggers=":mainNavBar:userProfile"
                            launchListener="#{portalHeader.launchUserProfileDialog}"
							returnListener="#{portalHeader.modifyUser}">
                        </tr:commandNavigationItem>
                        <tr:commandNavigationItem text="#{commonMsg.logout}"
                            action="#{sessionContext.logout}" 
                            id="logoutMenuEntry"/>
                    </tr:navigationPane>
                    
                    <tr:outputFormatted styleClass="af|navigationPane::bar-content infinityLoginAs"
                        value="#{commonMsg.loggedInUser}"/>

                    <tr:navigationPane hint="bar" styleClass="mainNavBar portalRefreshBar">
                        <tr:commandNavigationItem text="|" styleClass="hiddenMenuItemForSeparator"
                            rendered="#{configuration.configurationOn}"/>
                        <tr:commandNavigationItem text="#{commonMsg.doUpdate}"
                            disabled="#{portalHeader.processPortalSession.activityPanelVisible}"
                            action="#{sessionContext.resetSession}"
                            rendered="#{portalHeader.updateButtonEnabled}"
                            id="updateMenuEntry" />
                        <tr:commandNavigationItem text=""
                            disabled="true" />
                    </tr:navigationPane>
                    
					<ppc:skinConfigPanel />
                </div>
                
</ui:composition>
